-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
31 lines (26 loc) · 1.23 KB
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <iostream>
#include <string.h>
using namespace std;
int main() {
char A[20], B[20], C[20];
cin >> A;
cin >> B;
cin >> C;
if (strcmp(A, "vertebrado") == 0 && strcmp(B, "ave") == 0 && strcmp(C, "carnivoro") == 0)
cout << "aguia" << endl;
else if (strcmp(A, "vertebrado") == 0 && strcmp(B, "ave") == 0 && strcmp(C, "onivoro") == 0)
cout << "pomba" << endl;
else if (strcmp(A, "vertebrado") == 0 && strcmp(B, "mamifero") == 0 && strcmp(C, "onivoro") == 0)
cout << "homem" << endl;
else if (strcmp(A, "vertebrado") == 0 && strcmp(B, "mamifero") == 0 && strcmp(C, "herbivoro") == 0)
cout << "vaca" << endl;
else if (strcmp(A, "invertebrado") == 0 && strcmp(B, "inseto") == 0 && strcmp(C, "hematofago") == 0)
cout << "pulga" << endl;
else if (strcmp(A, "invertebrado") == 0 && strcmp(B, "inseto") == 0 && strcmp(C, "herbivoro") == 0)
cout << "lagarta" << endl;
else if (strcmp(A, "invertebrado") == 0 && strcmp(B, "anelideo") == 0 && strcmp(C, "hematofago") == 0)
cout << "sanguessuga" << endl;
else if (strcmp(A, "invertebrado") == 0 && strcmp(B, "anelideo") == 0 && strcmp(C, "onivoro") == 0)
cout << "minhoca" << endl;
return 0;
}